Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to choose template #269

Merged
merged 9 commits into from
Dec 10, 2024
Merged

Conversation

j4b6ski
Copy link
Contributor

@j4b6ski j4b6ski commented Dec 8, 2024

This change allows providing a custom template arg flag -t/--template:

sinol-make init foo -t [repo link or disk path] [optional subdir]

It defaults to the upstream repository and example_package subdir.

Changed the example_package id pattern from abc to __ID__. All filenames and file contents are now substituted.

Changed the positional output directory argument to -o/--output flag to help avoid accidents.

Added result directory cleanup on failure.

This change allows providing a custom template arg flag -t/--template:
```
sinol-make init foo -t [repo link or disk path] [optional subdir]
```
It defaults to the upstream repository and example_package subdir.

Changed the example_package id pattern from `abc` to `__ID__`.
All filenames and file contents are now substituted.

Changed the positional output directory argument to `-o/--output` flag
to help avoid accidents.

Added result directory cleanup on failure.
src/sinol_make/commands/init/__init__.py Outdated Show resolved Hide resolved
src/sinol_make/commands/init/__init__.py Outdated Show resolved Hide resolved
Try accessing the local git repo in the project root first when cloning
example_package. Only if that doesn't work, fall back to online github.

Also adds some extra local path tests to init/test_unit.
Also removes one unnecessary os.getcwd() call.
Also removes the old "abc" template string hack since we test the
current template now.
@MasloMaslane MasloMaslane merged commit 8cf5344 into sio2project:main Dec 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants